package com.aidex.biz.service.impl;

import java.util.List;
import com.aidex.common.annotation.DataScope;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.biz.mapper.MonthModelDetialsMapper;
import com.aidex.biz.domain.MonthModelDetials;
import com.aidex.biz.service.MonthModelDetialsService;
import org.springframework.transaction.annotation.Transactional;
import com.aidex.common.utils.NumberUtils;

/**
 * 月报模版配置详情Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2025-01-16
 */
@Service
@Transactional(readOnly = true)
public class MonthModelDetialsServiceImpl extends BaseServiceImpl<MonthModelDetialsMapper, MonthModelDetials> implements MonthModelDetialsService
{
    private static final Logger log = LoggerFactory.getLogger(MonthModelDetialsServiceImpl.class);

    /**
     * 获取单条数据
     * @param monthModelDetials 月报模版配置详情
     * @return 月报模版配置详情
     */
    @Override
    public MonthModelDetials get(MonthModelDetials monthModelDetials)
    {
        MonthModelDetials dto = super.get(monthModelDetials);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 月报模版配置详情id
     * @return 月报模版配置详情
     */
    @Override
    public MonthModelDetials get(String id)
    {
        MonthModelDetials dto = super.get(id);
        return dto;
    }


    /**
     * 查询月报模版配置详情列表
     * @param monthModelDetials 月报模版配置详情
     * @return 月报模版配置详情
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<MonthModelDetials> findList(MonthModelDetials monthModelDetials)
    {
        return super.findList(monthModelDetials);
    }

    /**
     * 分页查询月报模版配置详情列表
     * @param monthModelDetials 月报模版配置详情
     * @return 月报模版配置详情
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<MonthModelDetials> findPage(MonthModelDetials monthModelDetials)
    {
        return super.findPage(monthModelDetials);
    }

    /**
     * 保存月报模版配置详情
     * @param monthModelDetials
     * @return 结果
     */
    @Override
    public boolean save(MonthModelDetials monthModelDetials)
    {
        return super.save(monthModelDetials);
    }


    /**
     * 删除月报模版配置详情信息
     * @param monthModelDetials
     * @return 结果
     */
    @Override
    public boolean remove(MonthModelDetials monthModelDetials)
    {
        return super.remove(monthModelDetials);
    }

    /**
     * 批量删除月报模版配置详情
     * @param ids 需要删除的月报模版配置详情ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteMonthModelDetialsByIds(String[] ids)
    {
        return mapper.deleteMonthModelDetialsByIds(ids);
    }

    /**
     * 获取最大编号
     * @param monthModelDetials 月报模版配置详情
     * @return 结果
     */
    @Override
    public int findMaxSort(MonthModelDetials monthModelDetials)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(monthModelDetials));
    }
}
